<?php
/* @var $this PenerimaanTamuController */
/* @var $model PenerimaanTamu */

$this->breadcrumbs=array(
	'Penerimaan Tamu'=>Yii::app()->createUrl('PenerimaanTamu/listByUser'),
	'View Detail',
);

?>

<?php $this->beginWidget('ext.widgets.XPanel', array('width'=>900, 'height'=>130, 'title'=> 'Penerimaan Tamu')); ?>

<!-- form start -->
<div class="form">
	
	<fieldset>
		<legend>Data Tamu</legend>
                <table>
                    <tr>
                        <td style="vertical-align: top">
                            
                            <table>
                                <tr>
                                        <td width="150">Nama : </td>
                                        <td width="150"><?php echo $PenerimaanTamu->Tamu->nama?></td>
                                        <td width="150">Tanggal :</td>
                                        <td width="150"><?php echo date('d-m-Y', strtotime($PenerimaanTamu->tanggal))?></td>
                                        <td rowspan="5"><?php echo CHtml::image("/images/photos/".$PenerimaanTamu->Tamu->foto, '',array('height'=>'100'))?></td>
                                </tr>
                                <tr>
                                        <td width="150">No. HP : </td>
                                        <td width="200"><?php echo $PenerimaanTamu->Tamu->no_hp?></td>
                                        <td width="150">Jam Datang : </td>
                                        <td width="150"><?php echo date('H:i', strtotime($PenerimaanTamu->jam_datang))?></td>
                                </tr>
                                <tr>
                                        <td>Instansi :</td>
                                        <td><?php echo $PenerimaanTamu->Tamu->Instansi->nama?></td>
                                        <td width="150">Status : </td>
                                        <td width="150"><?php echo $PenerimaanTamu->status_terima?></td>
                                        
                                </tr>
                                <tr>
                                        <td>Jumlah Tamu : </td>
                                        <td><?php echo $PenerimaanTamu->jumlah_tamu?></td>
                                        <td width="150"></td>
                                        <td width="150"></td>
                                        
                                </tr>
                                <tr>
                                        <td>No Kartu : </td>
                                        <td><?php echo $PenerimaanTamu->KartuTamu->no_kartu?></td>
                                        <td width="150"></td>
                                        <td width="150"></td>
                                        
                                </tr>
                        </table>
                            <fieldset>
                                <legend>Identitas</legend>
                                <?php $this->widget('ext.widgets.grid.AxGridView', array(
                                        'id'=>'penerimaan-tamu-grid',
                                        'dataProvider'=>  Identitas::model()->ListBy($PenerimaanTamu->Tamu->id_tamu),
                                        'deleteTopButton'=>FALSE,
                                        'createTopButton' => FALSE,
                                        'columns'=>array(
                                               'no_identitas',
                                                'tipe_identitas',
                                                
                                        ),
                                )); 
                                ?>
                            </fieldset>
                        </td>
                       
                    </tr>
                </table>
		
	</fieldset>
        <table>
            <tr>
                <td>
                    <fieldset>
                            <legend>Tujuan</legend>
                            <table>
                                    <tr>
                                            <td width="150">Nama : </td>
                                            <td width="200"><?php echo $PenerimaanTamu->Pegawai->nama?></td>
                                            <td >&nbsp;</td>
                                            <td width="150">NIP : </td>
                                            <td width="200"><?php echo $PenerimaanTamu->Pegawai->nip?></td>
                                    </tr>
                                    <tr>
                                            <td width="150">Jabatan </td>
                                            <td width="200"><?php echo $PenerimaanTamu->Pegawai->Jabatan->nama?></td>
                                            <td>&nbsp;</td>
                                            <td>Unit : </td>
                                            <td><?php echo $PenerimaanTamu->Pegawai->Jabatan->StrukturOrganisasi->nama?></td>
                                    </tr>
                            </table>
                    </fieldset>
                </td>
                <td width="50%" style="vertical-align: top">
                    <fieldset>
                            <legend>Keperluan</legend>
                             <table width="50%">
                                    <tr>
                                            <td width="150">Keperluan : </td>
                                            <td width="200"><?php echo $PenerimaanTamu->Keperluan->nama?></td>
                                    </tr>
                                    
                            </table>
                    </fieldset>
                </td>
            </tr>
        </table>
	
	
        <?php 
            echo $this->renderPartial(
                    '_accept', 
                    array(
                        'PenerimaanTamu'=>$PenerimaanTamu,
                        'Meetingroom' => $Meetingroom
                        )
                    );
            
            echo $this->renderPartial(
                    '_pengalihan', 
                    array(
                        'PenerimaanTamu'=>$PenerimaanTamu,
                        'Meetingroom' => $Meetingroom
                        )
                    );
            
            echo $this->renderPartial(
                    '_reschedule', 
                    array(
                        'PenerimaanTamu'=>$PenerimaanTamu,
                        'Meetingroom' => $Meetingroom
                        )
                    );
            
            echo $this->renderPartial(
                    '_tolak', 
                    array(
                        'PenerimaanTamu'=>$PenerimaanTamu,
                        'Meetingroom' => $Meetingroom
                        )
                    );
            
        ?>
    
</div>

<?php $this->endWidget();?>
